<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">-->
    <script type="text/javascript" charset="utf-8" src="/static/lib/plug/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/lib/plug/ueditor/ueditor.all.min.js"></script>

    {% include 'public_css.html' %}

</head>

<body>

{% include 'myblogs/public_topbar.html' %}

<!-- 博客列表 -->
<hr class="am-g" color="black">
<h2>
    博客栏
</h2>

{% if obj.login %}
    <div class="am-g" align='left'>
        <button type="button" onclick="location.href='/my_blog/add_blog/'" class="am-btn am-btn-success">添加文章</button>
    </div>
{% endif %}
<br>

<table class="am-table">
    <thead>
    <tr>
        <th>博文名</th>
        <th>管理</th>
        <th>创建时间</th>
    </tr>
    </thead>
    <tbody>
    {% for blog in obj.blog_list %}


        <tr>
            <td><a href="/sharer_blog/{{ blog.id }}/">{{ blog.id }}.《{{ blog.blog_title }}》</a></td>
            <td>
                <span><a href="./?type=editor&blog_id={{ blog.id }}">编辑</a></span>
                <span><a href="./?type=set_top&blog_id={{ blog.id }}">置顶</a></span>
                <span><a href="./?type=delete&blog_id={{ blog.id }}">删除</a></span>
            </td>
            <td>{{ blog.createTime }}</td>
        </tr>




    {% endfor %}

    </tbody>
</table>
<!-- 博客列表 END-->


<!-- message -->
<br>
<hr class="am-g" color="black">
<h2>
    消息栏
</h2>

<div class="am-panel am-panel-default">
    <div class="am-panel-hd">最新消息</div>
{{ obj.new_msg_list.count }}
    {% for msg in obj.new_msg_list %}


        <div class="am-panel-bd">
            {% ifequal msg.type  'praise' %}
                用户"{{ msg.from_per }}"赞了你的《{{ msg.origin_content }}》
                <p>时间：{{ msg.createTime }}</p>
            {% endifequal %}

            {% ifequal msg.type  'scan' %}
                用户"{{ msg.from_per }}"浏览了你的《{{ msg.origin_content }}》
                <p>时间：{{ msg.createTime }}</p>
            {% endifequal %}

            {% ifequal msg.type  'comment' %}
                用户"{{ msg.from_per }}"评论了你的《{{ msg.origin_content }}》：
                <a href="{{ msg.origin_url }}">{{ msg.content }}</a>
                <p>时间：{{ msg.createTime }}</p>
            {% endifequal %}


        </div>
    {% endfor %}
</div>
<a href="/account/backstage/all_message/">历史消息</a>

<!-- message END -->
<br>
{{ obj.tip }}
{% include 'public_footer.html' %}
</body>
{% include 'public_js.html' %}
</html>